﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{

    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("-----------------欢迎进入游戏世界-----------------");
            Console.WriteLine();
            while (true)
            {
                Console.WriteLine("********************");
                Console.WriteLine("*****猜拳，开始*****");
                Console.WriteLine("********************");


                //Console.WriteLine("请输入您的姓名：");
                //string str = Console.ReadLine();
                //Console.WriteLine($"{a} VS {str} 对战");
                //Console.WriteLine("开始游戏吗？<y/n>");

                Console.WriteLine("请选择对方角色：1.刘备 2.孙权 3.曹操");
                int a = int.Parse(Console.ReadLine());
                Role r = new Role();
                switch (a)
                {
                    case 1:
                        r = new Role("刘备");
                        break;
                    case 2:
                        r = new Role("孙权");
                        break;
                    case 3:
                        r = new Role("曹操");
                        break;
                    default:
                        break;
                }
                Player p = new Player();
                Console.WriteLine("请输入您的名字：");
                p.Name = Console.ReadLine();

                Console.WriteLine($"{p.Name} VS {r.Name} 对战");
                Console.WriteLine("开始游戏吗 <y/n>");
                string xuan = Console.ReadLine();
                if (xuan == "n")
                {
                    return;
                }
                Game g = new Game();
                bool v = g.Gaming(r, p);
                if (v==false)
                {
                    Console.WriteLine("系统退出");
                    return;
                }
            }

        }
    }
}
